import Vue from 'vue'
import Router from 'vue-router';

const Login = () => import('../pages/login/index.vue')
const Contact = () => import('../pages/chat/index.vue')

Vue.use(Router)

export default new Router({
    mode: 'history',
    routes: [
        {
            path: '',
            redirect: '/login'
        },
        {
            path: '/',
            redirect: '/login'
        },
        {
            path: '/login',
            name: 'login',
            component: Login
        },
        {
          path: '/contact',
          name: 'contact',
          component: Contact
        },
        {
          path: '/contact/:id',
          name: 'contact',
          component: Contact
        },
        {
          path:'*', redirect: '/login'
        }

    ]
})
